package com.example.forecast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;

import com.example.forecast.R;

public class MainActivity extends AppCompatActivity {

    private ImageView logo;
    private Button sixtyFour, microLiuRen,character;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        logo = findViewById(R.id.iv_main_logo);
        sixtyFour = findViewById(R.id.btn_main_sixtyFour);
        microLiuRen = findViewById(R.id.btn_main_microLiuRen);
        character = findViewById(R.id.btn_main_character);

        Animation animation = AnimationUtils.loadAnimation(this,R.anim.anim_main_logo);
        logo.setAnimation(animation);

        sixtyFour.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, SixtyFourActivity.class);
                startActivity(intent);
            }
        });

        microLiuRen.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, MicroLiuRenActivity.class);
                startActivity(intent);
            }
        });

        character.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, CharacterActivity.class);
                startActivity(intent);
            }
        });

    }
}